package com.wanbangee.marksystem.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.wanbangee.marksystem.entities.StatisticsScoreReport;
import com.wanbangee.marksystem.service.MClassServiecApi;
import com.wanbangee.marksystem.service.StatisticsScoreReportService;

@RestController
@RequestMapping("/scoreReport")
public class SelectReportCartController {
@Autowired
public StatisticsScoreReportService statisticsScoreReportService;

@Autowired
public MClassServiecApi mClassServiecApi = null;
//查询成绩单
@RequestMapping(value = "/selectScoreReportByExamIdAndClaIdAndStuNm", method = RequestMethod.GET)
public  Map<String,Object> selectScoreReportByExamIdAndClaIdAndStuNm(Integer examId,Integer claId,String stuNmOrStuNo) {
	Map<String,Object> responseMap = new HashMap<String, Object>();
	List<StatisticsScoreReport>  statisticsScoreReport = this.statisticsScoreReportService.selectScoreReportByExamIdAndClaIdAndStuNm(examId, claId, stuNmOrStuNo);
	responseMap.put("message","接口成功");
	responseMap.put("code", 1001);
	 responseMap.put("statisticsScoreReport", statisticsScoreReport);
	 return responseMap;
}
//查询这次考试的班级
@RequestMapping(value = "/getClassByExamId", method = RequestMethod.GET)
public  Map<String,Object> getClassByExamId(Integer examId) {
	
	 return this.mClassServiecApi.selectClassByexamId(examId);
}

//查询当前登录人所在学校所有考试
@RequestMapping(value = "/selectMexamBySchId", method = RequestMethod.GET)
public  Map<String,Object> selectExamInfoBySchId(Integer schId) {
	
	 return this.mClassServiecApi.selectMExamInfoBySchId(schId);
}
}
